<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>跟进计划</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link rel="stylesheet" href="/css/viewer.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
    <!--固定table列-->
    <link href="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.min.css" rel="stylesheet"/>

    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css" />
    <link rel="stylesheet" href="/css/input_tags.css"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css">
    <link rel="stylesheet" href="/js/need/verfont.css" />
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <!--表单校验插件-->
    <link rel="stylesheet" href="/css/bootstrapValidator.min.css" />

    <link rel="stylesheet" href="/css/skin.css"/>
    <link rel="stylesheet" href="/css/csd/customerManager/productExchange.css" type="text/css"/>
</head>
<body>
<div class="container-fluid" id="productExchange">
    <div class="card">
        <div class="card-header">
            <h1>产品兑换</h1>
        </div>
        <div class="card-body">
            <ul class="new-tabs">
                <!-- 兑换明细  兑换规则设置-->
                <input type="hidden" id="exchangeType" name="dateType"/>
                <li class="nav-item active">
                    <a href="#exchangeDetail" data-toggle="tab"  id="exchangeInspect" onclick="changeTab('detail')">兑换明细</a>
                </li>
                <li class="nav-item">
                    <a href="#exchangeRuleSet" data-toggle="tab"  id="exchangeRule" onclick="changeTab('rule')">兑换规则设置</a>
                </li>
            </ul>
            <main class="tab-content">
                <div role="tabpanel" id="exchangeDetail" class="tab-pane active">
                    <!--兑换明细-->
                    <div class="row content-action">
                        <div class="col-lg-7 col-md-6 col-sm-6 col-xs-12">
                            <!-- 全部 本周 本月 上月 自定义-->
                            <div class="time-search pull-left">
                                <input type="hidden" id="dateType" name="dateType"/>
                                <div id="all" class="timeBtn active-second" onclick="selectTime('all')">全部</div>
                                <div id="customize" class="timeBtn" onclick="selectTime('customize')">自定义</div>
                            </div>
                            <div class="custom-input pull-left" id="customInput" style="margin-left: 10px;width: 410px;">
                                <div class="input-group">
                                    <input type="text" class="form-control datepicker" placeholder="请选择兑换时间" id="arriveTimeStart">
                                    <span class="input-group-addon">至</span>
                                    <input type="text" class="form-control datepicker" placeholder="请选择兑换时间" id="arriveTimeEnd">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default" id="customDateBtn" onClick="exchangeDetailsList()">确定</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-5 col-md-6 col-sm-6 col-xs-12">
                            <div class="pull-right">
                                <div class="min-search pull-left">
                                    <input class="form-control" type="text" placeholder="请输入规则标题" id="ruleTitle" name="ruleTitle">
                                    <button class="btn btn-primary" type="button" onclick="exchangeDetailsList()"><i class="mdi mdi-magnify"></i><span>搜索</span></button>
                                </div>
                                <div id="advanceFilterContainer">
                                    <button class="btn btn-default btn-senior" id="openFilter" onClick="showToggle()"><i class="mdi mdi-sort-variant"></i>高级筛选</button>
                                    <button class="btn btn-default btn-senior" id="closeFilter" onClick="showToggle()"><i class="mdi mdi-close"></i>关闭筛选</button>
                                    <div id="filterFilesContainer" class="clearFix">
                                        <div id="filterFiles" class="clearFix">
                                            <!--                                    <i class="trangle"></i>-->
                                            <h4>高级筛选</h4>
                                            <div class="clearFix filterContent">
                                                <div>


                                                </div>
                                                <div id="btnsContainerDetail" class="clearFix">
                                                    <button class="btn btn-default" id="btn-reset">重置</button>
                                                    <button class="btn btn-primary" type="button" id="btn-search" onClick="exchangeDetailsList()">
                                                        <i class="mdi mdi-magnify"></i><span>搜索</span>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>

                                    </div>
                                </div>

                            </div>
                        </div>
                        <div class="productDetailsFormCon">
                            <table id="exchangeDetailsTable"></table>
                        </div>
                    </div>
                </div>
                <div role="tabpanel" id="exchangeRuleSet" class="tab-pane">
                    <div class="clearFix">
                        <div class="form-group findTabsCon">
                            <ul class="new-tabs findTabs">
                                <!-- 会员卡权益课程 会员权益兑换-->
                                <input type="hidden" id="ruleType" name="dateType"/>
                                <li class="nav-item active">
                                    <a href="#memberCardExchangeCourse" data-toggle="tab" id=memberCardExchange"">会员卡权益兑换课程</a>
                                </li>
                                <li class="nav-item">
                                    <a href="#memberPowerExchange" data-toggle="tab" id="memberExchange">会员权益兑换</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="tab-content">
                        <div role="tabpanel" class="tab-pane active" id="memberCardExchangeCourse">
                            <div class="modulesContainer">
                                <div class="tableContainer">
                                    <header class="clearFix">
                                        <p class="pull-left">现场参会天数兑换课程</p>
                                        <button class="pull-right btn btn-primary" type="button" onClick="addRule('days')">添加规则</button>
                                    </header>
                                    <table id="dayExchange"></table>
                                </div>
                            </div>
                            <div class="modulesContainer">
                                <div class="tableContainer">
                                    <header class="clearFix">
                                        <p class="pull-left">专行业交流次数兑换课程</p>
                                        <button class="pull-right btn btn-primary" type="button" onClick="addRule('communications')">添加规则</button>
                                    </header>
                                    <table id="communicationExchange"></table>
                                </div>
                            </div>
                            <div class="modulesContainer">
                                <div class="tableContainer">
                                    <header class="clearFix">
                                        <p class="pull-left">高端班按价格兑换课程</p>
                                        <button class="pull-right btn btn-primary" type="button" onClick="addRule('product')">添加规则</button>
                                    </header>
                                    <table id="priceExchange"></table>
                                </div>
                            </div>

                        </div>
                        <div role="tabpanel" class="tab-pane" id="memberPowerExchange">
                            <div class="modulesContainer">
                                <div class="tableContainer">
                                    <header class="clearFix">
                                        <p class="pull-left">高端班兑换现场天数</p>
                                        <button class="pull-right btn btn-primary" type="button" onClick="addRule('courseExchangeDays')">添加规则</button>
                                    </header>
                                    <table id="courseExchangeDays"></table>
                                </div>
                            </div>
                            <div class="modulesContainer">
                                <div class="tableContainer">
                                    <header class="clearFix">
                                        <p class="pull-left">现场天数兑换行业会次数</p>
                                        <button class="pull-right btn btn-primary" type="button" onClick="addRule('daysExchangeCommunication')">添加规则</button>
                                    </header>
                                    <table id="daysExchangeCommunication"></table>
                                </div>
                            </div>
                            <div class="modulesContainer">
                                <div class="tableContainer">
                                    <header class="clearFix">
                                        <p class="pull-left">行业会次数兑换现场天数</p>
                                        <button class="pull-right btn btn-primary" type="button" onClick="addRule('communicationExchangeDays')">添加规则</button>
                                    </header>
                                    <table id="communicationExchangeDays"></table>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </main>
        </div>
    </div>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="addRuleModal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-body" style="min-height: 200px;">
                <div class="modal-header">
                    <h4 class='pull-left'>添加规则</h4>
                    <i class="mdi mdi-close pull-right" onclick="closeRule()" style="font-size:24px;"></i>
                </div>
                <main id="numberExchangeRule" class="clearFix">
                    <form class="form-horizontal" id="exchangeNumber">
                        <div class="clearFix" >
                            <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7 form-group clearFix" style="margin-bottom:10px">
                                <label class="control-label label-required pull-left">规则标题:</label>
                                <div class="form-content setContentWidth">
                                    <input class="form-control" id='commonRuleTitle' name="commonRuleTitle" type="text" autocomplete="off">
                                </div>
                            </div>
                            <div class="col-lg-5 col-md-5 col-sm-5 col-xs-5  form-group clearFix">
                                <label class="control-label label-required pull-left" id="exchangeName">兑换次数:</label>
                                <div class="form-content setContentWidth">
                                    <input class="form-control" id='changeNumber' name="changeNumber" type="text" autocomplete="off">
                                </div>
                            </div>
                        </div>

                        <div class="row form-group clearFix">
                            <label class="control-label">兑换课程:</label>
                            <div class="form-content tableList">
                                <div class="conditionFilter clearFix">
                                    <ul class="new-tabs pull-left col-lg-5 col-md-5 col-sm-5 col-xs-12">
                                        <!-- 全部 会员产品 非会员产品-->
                                        <li class="nav-item active">
                                            <a href="#" data-toggle="tab" aria-expanded="false" id="allTab" onclick="changeProductType('')">全部</a>
                                        </li>
                                        <li class="nav-item">
                                            <a href="#" data-toggle="tab" aria-expanded="false" id="member" onclick="changeProductType('1')">会员产品</a>
                                        </li>
                                        <li class="nav-item">
                                            <a href="#" data-toggle="tab" aria-expanded="false" id="noMember" onclick="changeProductType('0')">非会员产品</a>
                                        </li>
                                    </ul>
                                    <div class="min-search pull-right" id="searchContainer">
                                        <input class="form-control" type="text" placeholder="请输入产品名称">
                                        <button class="btn btn-primary" onclick="productNameSearch(this,'exchangeCourse','课程名称','memberType')" type="button" id="btn-search-simple"><i class="mdi mdi-magnify"></i><span>搜索</span></button>
                                    </div>
                                </div>
                                <table id="exchangeCourse"></table>
                            </div>
                        </div>
                    </form>
                </main>
                <!--高端班兑换课程-->
                <main id="productExchangeRule" class="clearFix">
                    <div class="clearFix">
                        <form class="form-horizontal" id="highExchangeCourseForm">
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 form-group clearFix" style="margin:0 0 10px 0">
                                <label class="control-label label-required pull-left">规则标题:</label>
                                <div class="form-content  pull-right" style="width:260px">
                                    <input class="form-control" id='highExchangeCourseRuleTitle' name="highExchangeCourseRuleTitle" type="text" autocomplete="off">
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 form-content tableList">
                        <div class="conditionFilter clearFix">
                            <label class="control-label">产品列表:</label>
                            <div class="min-search pull-right searchContainer">
                                <input class="form-control" type="text" placeholder="请输入产品名称">
                                <button class="btn btn-primary btn-search-simple" onclick="productNameSearch(this,'productList','产品名称','')" type="button"><i class="mdi mdi-magnify"></i><span>搜索</span></button>
                            </div>
                        </div>
                        <table id="productList"></table>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 form-content tableList">
                        <div class="conditionFilter clearFix">
                            <label class="control-label">兑换课程列表:</label>
                            <div class="min-search pull-right searchContainer">
                                <input class="form-control" type="text" placeholder="请输入产品名称">
                                <button class="btn btn-primary btn-search-simple" onclick="productNameSearch(this,'courseList','产品名称','')" type="button"><i class="mdi mdi-magnify"></i><span>搜索</span></button>
                            </div>
                        </div>
                        <table id="courseList"></table>
                    </div>
                </main>
                <!--现场天数兑换行业会次数-->
                <main id="dayCommunicationExchangeRule" class="clearFix">
                    <form id="exchangeCommunicationNumber">
                        <div class="form-group clearFix">
                            <label class="control-label label-required pull-left">规则标题:</label>
                            <div class="form-content">
                                <input class="form-control" id='dayRuleTitle' name="dayRuleTitle" type="text" autocomplete="off">
                            </div>
                        </div>
                        <div class="form-group clearFix">
                            <label class="control-label label-required pull-left" id="dayName">现场天数:</label>
                            <div class="form-content">
                                <input class="form-control" id='dayNumber' name="dayNumber" type="text" autocomplete="off">
                            </div>
                        </div>
                        <div class="form-group clearFix">
                            <label class="control-label label-required pull-left" id="exchangeCommunicationName">兑换次数:</label>
                            <div class="form-content">
                                <input class="form-control" id='changeCommunicationNumber' name="changeCommunicationNumber" type="text" autocomplete="off">
                            </div>
                        </div>
                    </form>
                </main>
                <!--行业会次数兑换现场天数-->
                <main id="communicationDayExchangeRule" class="clearFix">
                    <form id="exchangeDayNumber">
                        <div class="form-group clearFix">
                            <label class="control-label label-required pull-left">规则标题:</label>
                            <div class="form-content">
                                <input class="form-control" id='communicationRuleTitle' name="communicationRuleTitle" type="text" autocomplete="off">
                            </div>
                        </div>
                        <div class="form-group clearFix">
                            <label class="control-label label-required pull-left" id="communicationName">行业会次数:</label>
                            <div class="form-content">
                                <input class="form-control" id='communicationNumber' name="communicationNumber" type="text" autocomplete="off">
                            </div>
                        </div>
                        <div class="form-group clearFix">
                            <label class="control-label label-required pull-left" id="exchangeDayName">兑换天数:</label>
                            <div class="form-content">
                                <input class="form-control" id='changeDayNumber' name="changeDayNumber" type="text" autocomplete="off">
                            </div>
                        </div>
                    </form>
                </main>
                <div id='btnsContainer'>
                    <div class="btn btn-default"style="margin-right: 20px;" onclick="reset()">重置</div>
                    <div class="btn btn-primary" onclick="submitRule()" >提交</div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--兑换明细-->
<div class="modal fade" tabindex="-1" role="dialog" id="exchangeDetailModal">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>兑换明细</h4>
            </div>
            <div class="modal-body" style="min-height: 200px;">
                <main id="exchangeApproval" class="clearFix">
                    <form class="form-horizontal clearFix" style="padding:0 20px;" id="exchangeDtails">
                        
                    </form>
                </main>
            </div>
        </div>
    </div>
</div>
<!-- 附件预览 -->
<div class="modal fade bs-example-modal-lg fileModal" tabindex="-1" role="dialog" id="fileModal">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>附件预览</h4>
            </div>
            <div class="modal-body">
                <iframe src="" frameborder="0" id="fileIframe"></iframe>
            </div>
        </div>
    </div>
</div>
</body>

<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min-1.18.3.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<script src="/js/crm/common/input-tag.js"></script>
<script src="/js/crm/common/city.js"></script>
<script src="/js/crm/common/common.js"></script>
<!--table固定列-->
<script type="text/javascript" src="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js"></script>
<!-- 拖动 -->
<script src="/js/bootstrap-table/extensions/resizable/bootstrap-table-resizable.min.js"></script>
<script src="/js/crm/common/colResizable-1.6.min.js"></script>

<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script type="text/javascript" src="/js/crm/common/dataRangePicker.min.js"></script>
<script src="/js/verSelect.2.0.js"></script>
<!--图片查看-->
<script type="text/javascript" src="/js/viewer.js"></script>
<script type="text/javascript" src="/js/jquery-viewer.js"></script>
<!--表单校验-->
<script type="text/javascript" src="/js/bootstrapValidator.min.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script type="text/javascript" src="/js/bootstrap.lyear.dropdowntree.min.js"></script>
<!-- 子页面公用js -->
<script src="/js/crm/common/pageCommon.js"></script>
<script src="/js/crm/csd/customerManager/productExchange.js"></script>
</html>
